﻿<Window 
    x:Class="SettingWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:me="clr-namespace:Pronama.Misao.AddIn"
    mc:Ignorable="d"
    Title="IRC Setting" 
    ShowInTaskbar="False"
    Icon="comments.png"
    Width="300" Height="300" ResizeMode="NoResize">
    <Window.Resources>
        <me:IntegerToStringConverter x:Key="IntegerToStringConverter" />
    </Window.Resources>
    <Window.BindingGroup>
        <BindingGroup />
    </Window.BindingGroup>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="1" Text="{Binding Server}" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Port, Converter={StaticResource IntegerToStringConverter}}" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Channel}" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding UserName}" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="4" Text="Not Implemented" VerticalAlignment="Center" IsReadOnly="True" IsEnabled="False" />
            <!--<PasswordBox Name="PasswordBox" Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" FontFamily="メイリオ" IsEnabled="False" />-->
            <TextBox Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" Text="{Binding NickName}" />
            <ComboBox Grid.Column="1" Grid.Row="6" Name="TextEncode" SelectedValue="{Binding EncodingWebName}" VerticalAlignment="Center" SelectedValuePath="Content">
                <ComboBoxItem Content="UTF-8" IsSelected="True"></ComboBoxItem>
                <ComboBoxItem Content="ISO-2022-JP"></ComboBoxItem>
            </ComboBox>
            
            <CheckBox Grid.Row="7" IsEnabled="False" Content="Convert Romaji to Hiragana" IsChecked="{Binding Path=KanaConversionEnabled}" VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="3" />

            <Label Content="Server:" VerticalAlignment="Center" />
            <Label Grid.Row="1" Content="Port:" VerticalAlignment="Center" />
            <Label Grid.Row="2" Content="Channel:" VerticalAlignment="Center" />
            <Label Grid.Row="3" Content="User Name:" VerticalAlignment="Center" />
            <Label Grid.Row="4" Content="Password:" VerticalAlignment="Center" />
            <Label Grid.Row="5" Content="Nickname:" VerticalAlignment="Center" />
            <Label Grid.Row="6" Content="Encode:" VerticalAlignment="Center" />
        </Grid>

        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="10">
            <Button Content="OK" Margin="0" HorizontalAlignment="Right" Width="80" Click="OkButton_Click" IsDefault="True" />
            <Button Content="Cancel" Margin="5 0 0 0" HorizontalAlignment="Right" Width="80" Click="CancelButton_Click" IsCancel="True" />
        </StackPanel>
        
    </Grid>
</Window>